A graphics processing pipeline converts input graphics data that is typically associated with three-dimensional objects into pixel data that is associated with a two-dimensional surface. In conventional implementations, a world-space portion of the graphics processing pipeline is responsible for processing the input graphics data, which is usually composed of a collection of triangles and related vertices, prior to when the data is converted into pixel data. A screen-space portion of the graphics processing pipeline is responsible for processing the converted pixel data and generating final pixel values for display.
One of the stages in the graphics processing pipeline is the rasterization stage, which typically involves converting the graphics data processed by the world-space portion of the pipeline into pixel data in screen-space. Rasterization may involve generating edge equations that describe the edges of triangles processed in the world-space portion of the pipeline, determining coverage information for those triangles, and computing attribute values for the pixels and fragments covered by the triangles. The calculations involved in rasterization are generally fixed point calculations that are normally performed with a fixed fractional-pixel precision. Thus, the results of fixed point rasterization calculations can be thought of as “snapped” to a grid, where the boxes of the grid correspond to boxes of fractional-pixel size.
In many implementations, a graphics processing pipeline may rasterize the same three-dimensional object at different resolutions. For example, a triangle may first be rasterized at a low resolution to make certain determinations about the triangle, such as what general portions of a surface are covered by the triangle. The triangle may subsequently be rasterized at a higher resolution to generate image data for display. However, rasterization conducted at a lower resolution generally provides results that are “snapped” to a coarser grid than rasterization conducted at a higher resolution. Therefore, lower resolution rasterization may produce coverage results that do not properly align with the coverage results of higher resolution rasterization. For example, if frame buffer memory is allocated for sparse rendering based on the results of low resolution rasterization, memory may be over-allocated or under-allocated due to the fact that the results of lower-resolution rasterization are snapped to a coarser grid. More specifically, memory may be allocated for blocks for which no allocation is necessary, or memory may fail to be allocated for blocks for which allocation is necessary.
Thus, there is a need for addressing the issues of rasterizing graphics data at different resolutions and/or other issues associated with the prior art.